#ifndef STORAGE_HH_
# define STORAGE_HH_

# include "tools/Vector.hh"

// storage: INCLUDED storage (more or less a pocket size)
// cd be a web on an helmet, a jacket pocket, ...

// more or less add a OpenGL cube at right place,
// blit right texture
// playing animation will make the hand go to these coords

// cd need an algo to automatically choose the right storage
// greedy algorithm ?
// => need contents various sizes according to this algo

enum e_storage_type
{
    SCRATCH = 0,
    BUTTON,
    WEB,
    HOLSTER,

    NB_TYPE
};

class Storage
{
    public:
        Storage();
        Storage(unsigned int ammo9,
                unsigned int ammoShotgun,
                unsigned int ammo762,
                unsigned int clip,
                bool allowHandWeapon,
                float capacity,
                unsigned int maxWeight,
                unsigned int weight);

        ~Storage();

    private:
        // cd replace by a list || map of allowed ammo and a maxBullets

        unsigned int _ammo9;		/// 9 mm ammo storage capacity
        unsigned int _ammoShotgun;	/// shotgun ammo storage capacity
        unsigned int _ammo762;	    /// 7.62 mm ammo storage capacity
        unsigned int _clip;		    /// max clip number
        bool _allowHandWeapon;  	/// we can put, at most, 1 handgun in a Storage

        float _capacity;     /// in cube cm
        float _maxWeight;    /// content max weight

        /** we do not consider storage empty weight: included in Cloth weight
         ** adding a holster / pocket to a jacket will alter jacket weight
         ** so, this _weight is equal to Storage's content weight
         */
        float _weight;

        /** allow special keys (F2-F12 ?) to directly point on this storage
         ** cd allow user to set it
         ** it must *NOT* be an OSD or something like this
         ** maybe using categories
         **   F2 through F4: jacket...
         */
        unsigned int _keyBinding; // TODO: need exact GLFW type, cd need an interface
        // keybinding should not be there..., maybe in Cloth ?

        e_storage_type _type; /// storage type, useful to play right checking sound

        Vector _coords; // relative to the inventory
};

#endif /* !STORAGE_HH_ */
